#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "Z80_CPU.h"
#include <QMessageBox>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::changeEvent(QEvent *e)
{
    QMainWindow::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}

void MainWindow::on_Z80_Test_clicked()
{
   Z80_CPU test;
   int t = test.test(10,10);
   QMessageBox Msg;
   char buffer[10];
   itoa(t,buffer,10);
   Msg.warning(this,tr("Z80"),tr(buffer),QMessageBox::Ok,QMessageBox::Abort);
}
